<template>
  <footer class="footer">
    <div class="container">
      <div class="footer-content">
        <div class="footer-brand">
          <div class="logo">
            <router-link to="/home">
              <el-icon class="logo-icon"><Document /></el-icon>
              <span class="logo-text">在线教育平台</span>
            </router-link>
          </div>
          <p>专注于提供高质量的在线教育服务，助力学员成长</p>
        </div>
        <div class="footer-links">
          <h4>热门课程分类</h4>
          <ul>
            <li><router-link to="/course/list?category=programming">编程开发</router-link></li>
            <li><router-link to="/course/list?category=design">设计创意</router-link></li>
            <li><router-link to="/course/list?category=data">数据分析</router-link></li>
            <li><router-link to="/course/list?category=business">商业管理</router-link></li>
          </ul>
        </div>
        <div class="footer-contact">
          <h4>联系我们</h4>
          <p>邮箱：support@online-edu.com</p>
          <p>电话：400-123-4567</p>
        </div>
      </div>
      <div class="footer-bottom">
        <p>&copy; {{ new Date().getFullYear() }} 在线教育平台. 保留所有权利.</p>
      </div>
    </div>
  </footer>
</template>

<script setup>
import { Document } from '@element-plus/icons-vue'
</script>

<style scoped>
/* 页脚样式 - PC端优化 */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 60px 0 40px;
  position: relative;
  margin-top: 60px;  /* 修改为正边距，确保页脚不会覆盖内容 */
  z-index: 1;  /* 降低z-index，确保内容在页脚上方 */
}

/* 装饰性顶部边框 */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 60px;
  gap: 40px;
}

.footer-brand {
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
}

.footer-links {
  flex: 1;
  min-width: 200px;
  margin-bottom: 30px;
}

.footer-contact {
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  margin-bottom: 24px;
}

.footer-brand .logo-icon {
  font-size: 32px;
  color: #667eea;
  margin-right: 10px;
}

.footer-brand .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: white;
}

.footer-brand p {
  color: #9ca3af;
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 300px;
}

.footer-links h4 {
  margin: 0 0 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #667eea;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
  display: inline-block;
  position: relative;
  padding-left: 12px;
}

.footer-links a::before {
  content: '>';
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s;
  color: #667eea;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-contact h4 {
  margin: 0 0 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
  position: relative;
  padding-bottom: 10px;
}

.footer-contact h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #667eea;
}

.footer-contact p {
  margin: 0 0 16px 0;
  color: #9ca3af;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.footer-contact p::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #667eea;
  border-radius: 50%;
  margin-right: 12px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #374151;
  color: #9ca3af;
  font-size: 15px;
}

/* 通用容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 优化PC端大屏幕体验 */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}
</style>